package com.duanjw.springframework.di.service.impl;

import com.duanjw.springframework.di.dao.UserDao;
import com.duanjw.springframework.di.dao.impl.UserDaoImpl;
import com.duanjw.springframework.di.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;

@Component
public class UserServiceImpl implements UserService {

//    @Autowired
//    private UserDao userDao;

    private final UserDao userDao;
//
    public UserServiceImpl(UserDao userDaoImpl1) {
        this.userDao = userDaoImpl1;
    }

    //
//    @Autowired
//    private UserDaoImpl userDaoImpl1;
//
//    @Autowired
//    private UserDaoImpl aaa;
    @Override
    public void query() {
        System.out.println(userDao);
//        System.out.println(userDaoImpl);
//        System.out.println(userDaoImpl1);
//        System.out.println(aaa);

//        System.out.println("UserServiceImpl.query，userDao："+userDao );
    }
}
